package com.drug.mingkang.service;

import com.drug.mingkang.model.AuditRecord;
import com.drug.mingkang.model.HqSupplier;
import com.drug.mingkang.model.vo.PurchaseMaterialVo;
import com.drug.mingkang.model.vo.PurchaseorderVo;
import com.drug.mingkang.model.HqPurchaseorder;
import com.drug.mingkang.model.vo.rawMaterialVo;
import com.drug.mingkang.utils.ResponseMessage;

import javax.servlet.http.HttpSession;
import java.util.List;

/**
 * 原材料采购单(HqPurchaseorder)表服务接口
 *
 * @author wenchangjian
 * @since 2020-08-11 12:00:13
 */
public interface HqPurchaseorderService {

    /**
     * 通过ID查询单条数据
     *
     * @param purchaseId 主键
     * @return 实例对象
     */
    HqPurchaseorder queryById(String purchaseId);

    /**
     * 查询多条数据
     * @param purchaseorderVo vo
     * @return 对象列表
     */
    List<HqPurchaseorder> queryAllByLimit(PurchaseorderVo purchaseorderVo);

    /**
     * 新增数据
     *
     * @param hqPurchaseorder 实例对象
     * @return 实例对象
     */
    HqPurchaseorder insert(HqPurchaseorder hqPurchaseorder);

    /**
     * 修改数据
     *
     * @param hqPurchaseorder 实例对象
     * @return 实例对象
     */
    HqPurchaseorder update(HqPurchaseorder hqPurchaseorder);

    /**
     * 通过主键删除数据
     *
     * @param purchaseId 主键
     * @return 是否成功
     */
    boolean deleteById(String purchaseId);

    int selectCount(PurchaseorderVo purchaseorderVo);

    List<rawMaterialVo> rawMaterialShowAllByLimit(rawMaterialVo rawMaterialVo);

    int rawMaterialselectCount(rawMaterialVo rawMaterialVo);

    List<Object> showTypeName();

    List<HqSupplier> showSupName();

    int insert(String arr, String remark, String supId, HttpSession session);

    List<PurchaseMaterialVo> selectMaterial(PurchaseMaterialVo purchaseMaterialVo);

    HqPurchaseorder selectRemarkOperator(String purchaseId);

    boolean updatePurchaseSumprice(String purchaseId, double purchaseSumprice);

    boolean updatePurchaseorder(String list, String remark, String supName, String purchaseId, HttpSession session);


    PurchaseMaterialVo selectPurchaseRemarkSupId(PurchaseMaterialVo purchaseMaterialVo);

    List<HqPurchaseorder> queryReviewByLimit(PurchaseorderVo purchaseorderVo);

    int selectReviewCount(PurchaseorderVo purchaseorderVo);

    boolean updateisva(String purchaseId,int state);

    /**
     * 原材料审核
     * @param purchaseorderVo
     * @param auditRecord
     * @param session
     * @return
     */
    ResponseMessage updateIsva(PurchaseorderVo purchaseorderVo, AuditRecord auditRecord, HttpSession session);

    boolean insertJoinTheInventory(String purchaseId, HttpSession session);
}